<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTicketUserStationTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('mckj_ticket_user_station', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('mcstation_id')->default(0)->comment('门店ID');
            $table->integer('user_id')->default(0)->comment('用户ID');
            $table->integer('ticket_user_id')->default(0)->comment('卡ID');
            $table->smallInteger('status')->default(1)->comment('状态（0：未使用，1：已使用）');
            $table->timestamp('created_time')->nullable()->comment('创建时间');
            $table->timestamp('updated_time')->nullable()->comment('更新时间');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('mckj_ticket_user_station');
    }
}
